﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string strId = Request.QueryString["id"];
        int id = 0;
        if (strId != null)
        {
            if (OTS.Common.Help.IsNumber(strId))
            {
                id = Convert.ToInt32(strId);
                if (id > 0)
                {
                    OTS.BLL.PlacardBLL bll = new OTS.BLL.PlacardBLL();
                    OTS.Model.placard model = bll.GetModel(id);
                    if (model != null)
                    {
                        if (model.plaType == 0)
                        {
                            this.lblTitle.Text = model.plaTitle;
                            this.lblContent.Text = model.plaContent;
                            this.lblTime.Text = OTS.Common.Help.ConvertToShortDate1(model.plaTime);
                        }
                        else
                        {
                            Response.Redirect(model.plaURL);
                            Response.End();
                            return;
                        }
                    }
                }
            }
        }
    }
}
